package com.yanyeori.webtest.strategy;

import com.yanyeori.framework.datasource.strategy.ListStrategy;
import org.apache.commons.collections4.CollectionUtils;

import java.util.List;

/**
 * @author chenkuan
 * @since 2021/8/18 018 17:12
 */
public class ListGetFirstStrategy implements ListStrategy {
    @Override
    public <T> T get(List<T> list, Object arg) {
        if (CollectionUtils.isEmpty(list)) {
            return null;
        }
        return list.get(0);
    }
}
